<html>
<head><meta charset="utf-8"><title>building lld fails · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html">building lld fails</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240514707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240514707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240514707">(May 27 2021 at 18:58)</a>:</h4>
<p>When I set <code>lld = true</code>in my config.toml and try to run <code>./x.py test</code>, I get this error</p>
<div class="codehilite"><pre><span></span><code>Updating only changed submodules
Submodules updated in 0.04 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized + debuginfo] target(s) in 0.20s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu)
    Finished release [optimized + debuginfo] target(s) in 0.26s
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -&gt; x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building LLD for x86_64-unknown-linux-gnu
running: &quot;cmake&quot; &quot;/rust/src/llvm-project/lld&quot; &quot;-G&quot; &quot;Ninja&quot; &quot;-DCMAKE_INSTALL_MESSAGE=LAZY&quot; &quot;-DCMAKE_C_COMPILER=gcc&quot; &quot;-DCMAKE_CXX_COMPILER=g++&quot; &quot;-DCMAKE_ASM_COMPILER=gcc&quot; &quot;-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64&quot; &quot;-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64&quot; &quot;-DLLVM_CONFIG_PATH=/rust/build/bootstrap/debug/llvm-config-wrapper&quot; &quot;-DLLVM_INCLUDE_TESTS=OFF&quot; &quot;-DCMAKE_CXX_STANDARD=14&quot; &quot;-DCMAKE_INSTALL_PREFIX=/rust/build/x86_64-unknown-linux-gnu/lld&quot; &quot;-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64&quot; &quot;-DCMAKE_BUILD_TYPE=Release&quot;
CMake Error at CMakeLists.txt:40 (message):
  LLVMConfig.cmake not found


-- Configuring incomplete, errors occurred!
See also &quot;/rust/build/x86_64-unknown-linux-gnu/lld/build/CMakeFiles/CMakeOutput.log&quot;.
thread &#39;main&#39; panicked at &#39;
command did not execute successfully, got: exit status: 1

build script failed, must exit now&#39;, /home/kt/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
        finished in 0.030 seconds
failed to run: /rust/build/bootstrap/debug/bootstrap t src/test/ui/linkage-attr/issue-71519.rs
Build completed unsuccessfully in 0:00:01
</code></pre></div>
<p>Any ideas? I am on NixOS.</p>



<a name="240532841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240532841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240532841">(May 27 2021 at 21:15)</a>:</h4>
<p><span class="user-mention" data-user-id="351526">@Kevin Tran</span> is the llvm-project subdirectory initialized?</p>



<a name="240556738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240556738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240556738">(May 28 2021 at 03:03)</a>:</h4>
<p>How can I tell? <span class="user-mention" data-user-id="232545">@Joshua Nelson</span></p>



<a name="240569697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240569697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240569697">(May 28 2021 at 07:24)</a>:</h4>
<p>OK, for some reason the path <code>build/x86_64-unknown-linux-gnu/ci-llvm/lib/cmake/llvm/LLVMConfig.cmake</code> relative to the project dir doesn't exist. It is needed in line 39 of <code>src/llvm-project/lld/CMakeLists.txt</code>.</p>



<a name="240791579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240791579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240791579">(May 31 2021 at 04:47)</a>:</h4>
<p>I'm pretty sure the llvm-project subdirectory is initialized. When I type <code>git status</code> in <code>src/llvm-project</code>, I get this output</p>
<div class="codehilite"><pre><span></span><code>HEAD detached at 5f67a5715771
nothing to commit, working tree clean
</code></pre></div>



<a name="240961236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240961236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240961236">(Jun 01 2021 at 15:41)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span></p>



<a name="240961328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240961328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240961328">(Jun 01 2021 at 15:41)</a>:</h4>
<p>I don't have time to help, sorry</p>



<a name="240961427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240961427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240961427">(Jun 01 2021 at 15:42)</a>:</h4>
<p>I don't know why that file specifically would be missing</p>



<a name="240961512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/240961512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#240961512">(Jun 01 2021 at 15:43)</a>:</h4>
<p>actually ci-llvm shouldn't be related at all, you're building from source</p>



<a name="241112586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/241112586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#241112586">(Jun 02 2021 at 07:08)</a>:</h4>
<p>actually i realized i was using the compiler profile, not the codegen profile. thanks. but now i'm getting another error</p>
<div class="codehilite"><pre><span></span><code>error: process didn&#39;t exit successfully: `/rust/build/bootstrap/debug/rustc -vV` (exit status: 127)
--- stderr
/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

command did not execute successfully: &quot;/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;build&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-Zbinary-dep-depinfo&quot; &quot;-j&quot; &quot;8&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind backtrace compiler-builtins-c&quot; &quot;--manifest-path&quot; &quot;/rust/library/test/Cargo.toml&quot; &quot;--message-format&quot; &quot;json-render-diagnostics&quot;
</code></pre></div>



<a name="241113972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/241113972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#241113972">(Jun 02 2021 at 07:28)</a>:</h4>
<p>You need to install zlib I think</p>



<a name="241114712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/building%20lld%20fails/near/241114712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kevin Tran <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/building.20lld.20fails.html#241114712">(Jun 02 2021 at 07:37)</a>:</h4>
<p>never mind, unsetting <code>use-lld = true</code> made things work</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>